<template>
  <el-card>
    <div class="box">
      <div class="img">
        <img :src="userStore.avatar" alt="">
      </div>
      <div class="right">
        <div class="title">{{ getTime() }}好{{ userStore.username }}</div>
        <p>欢迎来到蚂蚁看看管理后台</p>
      </div>
    </div>
  </el-card>
  <div class="bottom">
    <SvgIcon name="welcome" width="700px" height="400px" class="svg"></SvgIcon>
  </div>
</template>
<script setup lang="ts">
import useUserStore from "@/store/modules/user";
import {getTime} from "@/utils/time";

let userStore = useUserStore()
</script>
<style scoped lang="scss">
.box {
  display: flex;
  align-items: center;

  .img {
    width: 100px;
    height: 100px;
    display: flex;
    overflow: hidden;
    border-radius: 50%;

    img {
      width: 100%;
    }
  }

  .right {
    padding-left: 20px;

    .title {
      font-size: 30px;
      font-weight: bold;
    }

    p {
      padding-top: 10px;
      line-height: 30px;
      font-style: italic;
      color: #8c939d;
    }
  }
}

.bottom {
  position: relative;
  height: calc(100% - 140px);
  padding-top: 50px;
  display: flex;
  justify-content: center;

  .svg {
    width: 700px;
    height: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
</style>
